<?php
/**
 * sdPHP
 * @author     码农<8044023@qq.com>
 * @copyright  sdPHP
 * @license    https://gitee.com/cq8044023/sdphp
 */
namespace sdphp\lib;
use sdphp\lib\CoreBase\PortManagr;
class Controller{
    public $stdObj;
    public $cline_data;
    public function __construct($stdObj){
        $this->stdObj=$stdObj;
        $this->visit_data();
    }
    public function send($text){
        $this->stdObj->response->end($text);
    }
    protected function visit_data(){
        $arr=array();
        if ($this->stdObj->sock==PortManagr::SOCK_WS){//
            (!is_null($this->stdObj->request->get)) && $arr=$this->stdObj->request->get;
            (!is_null($this->stdObj->request->post)) && $arr=array_merge($this->stdObj->request->post,$arr);
        }
        $this->cline_data=Utils::unArray($arr, array_values(Config::getConfig()["data_format"]));
    }
    public function display(){
        
    }
}